function 注入(src){var s = document.createElement('script');s.language = 'javascript';s.type = 'text/javascript';s.src = src; document.documentElement.appendChild(s);}
function 引导注入(){try{
	if(window.location.href.indexOf("www.bilibili.com/video/")!=-1){
		var blob = new Blob([xlogcode]);blob.type="text/json";
		var url=window.URL.createObjectURL(blob);
		注入(url);
	}
}catch(err){console.log("❌引导注入 "+err);}}


/************************xlogcode************************/
var xlogcode=`
try{xx;}catch(e){xx={};}
try{logtxt;}catch(err){static_i=0;log_log_i=0;logtxt="";}
try{log;}catch(err){log=function(txt){logtxt="#"+static_i+++"　"+txt+"\\n"+logtxt;}}

var navjsontext="{\\"code\\":0,\\"message\\":\\"0\\",\\"ttl\\":1,\\"data\\":{\\"isLogin\\":true,\\"email_verified\\":0,\\"face\\":\\"//i0.hdslb.com/bfs/face/b155e05ef46c203c5ede8346e5f57f5ce2cd40f7.jpg\\",\\"face_nft\\":0,\\"face_nft_type\\":0,\\"level_info\\":{\\"current_level\\":1,\\"current_min\\":1,\\"current_exp\\":100,\\"next_exp\\":200},\\"mid\\":-101,\\"mobile_verified\\":1,\\"money\\":0,\\"moral\\":70,\\"official\\":{\\"role\\":0,\\"title\\":\\"\\",\\"desc\\":\\"\\",\\"type\\":-1},\\"officialVerify\\":{\\"type\\":-1,\\"desc\\":\\"\\"},\\"pendant\\":{\\"pid\\":0,\\"name\\":\\"\\",\\"image\\":\\"\\",\\"expire\\":0,\\"image_enhance\\":\\"\\",\\"image_enhance_frame\\":\\"\\",\\"n_pid\\":0},\\"scores\\":0,\\"uname\\":\\"请输入用户名\\",\\"vipDueDate\\":1713542400000,\\"vipStatus\\":1,\\"vipType\\":2,\\"vip_pay_type\\":1,\\"vip_theme_type\\":0,\\"vip_label\\":{\\"path\\":\\"\\",\\"text\\":\\"年度大会员\\",\\"label_theme\\":\\"annual_vip\\",\\"text_color\\":\\"#FFFFFF\\",\\"bg_style\\":1,\\"bg_color\\":\\"#FB7299\\",\\"border_color\\":\\"\\",\\"use_img_label\\":true,\\"img_label_uri_hans\\":\\"\\",\\"img_label_uri_hant\\":\\"\\",\\"img_label_uri_hans_static\\":\\"//i0.hdslb.com/bfs/vip/8d4f8bfc713826a5412a0a27eaaac4d6b9ede1d9.png\\",\\"img_label_uri_hant_static\\":\\"//i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/VEW8fCC0hg.png\\"},\\"vip_avatar_subscript\\":1,\\"vip_nickname_color\\":\\"#FB7299\\",\\"vip\\":{\\"type\\":2,\\"status\\":1,\\"due_date\\":1713542400000,\\"vip_pay_type\\":1,\\"theme_type\\":0,\\"label\\":{\\"path\\":\\"\\",\\"text\\":\\"年度大会员\\",\\"label_theme\\":\\"annual_vip\\",\\"text_color\\":\\"#FFFFFF\\",\\"bg_style\\":1,\\"bg_color\\":\\"#FB7299\\",\\"border_color\\":\\"\\",\\"use_img_label\\":true,\\"img_label_uri_hans\\":\\"\\",\\"img_label_uri_hant\\":\\"\\",\\"img_label_uri_hans_static\\":\\"//i0.hdslb.com/bfs/vip/8d4f8bfc713826a5412a0a27eaaac4d6b9ede1d9.png\\",\\"img_label_uri_hant_static\\":\\"//i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/VEW8fCC0hg.png\\"},\\"avatar_subscript\\":1,\\"nickname_color\\":\\"#FB7299\\",\\"role\\":3,\\"avatar_subscript_url\\":\\"\\",\\"tv_vip_status\\":0,\\"tv_vip_pay_type\\":0,\\"tv_due_date\\":0,\\"avatar_icon\\":{\\"icon_type\\":1,\\"icon_resource\\":{}}},\\"wallet\\":{\\"mid\\":-101,\\"bcoin_balance\\":0,\\"coupon_balance\\":0,\\"coupon_due_time\\":0},\\"has_shop\\":false,\\"shop_url\\":\\"\\",\\"allowance_count\\":0,\\"answer_status\\":0,\\"is_senior_member\\":0,\\"wbi_img\\":{\\"img_url\\":\\"//i0.hdslb.com/bfs/wbi/7cd084941338484aae1ad9425b84077c.png\\",\\"sub_url\\":\\"//i0.hdslb.com/bfs/wbi/4932caff0ff746eab6f01bf08b70ac45.png\\"},\\"is_jury\\":false}}";
var navblob = new Blob([navjsontext]);navblob.type="text/json";
var navobjurl=window.URL.createObjectURL(navblob);
var v2json={"code":0,"message":"0","ttl":1,"data":{"aid":874418257,"bvid":"BV1jN4y1Z7ZC","allow_bp":false,"no_share":false,"cid":1307073790,"max_limit":500,"page_no":1,"has_next":false,"ip_info":{"ip":"127.0.0.1","zone_ip":" 127.0.0.1","zone_id":4227072,"country":"朝鲜","province":"平壤","city":""},"login_mid":-101,"login_mid_hash":"ffffffff","is_owner":false,"name":"xxapk","permission":"10000,1001","level_info":{"current_level":1,"current_min":1,"current_exp":100,"next_exp":200,"level_up":1665883490},"vip":{"type":2,"status":1,"due_date":1713542400000,"vip_pay_type":1,"theme_type":0,"label":{"path":"","text":"年度大会员","label_theme":"annual_vip","text_color":"#FFFFFF","bg_style":1,"bg_color":"#FB7299","border_color":"","use_img_label":true,"img_label_uri_hans":"","img_label_uri_hant":"","img_label_uri_hans_static":"https://i0.hdslb.com/bfs/vip/8d4f8bfc713826a5412a0a27eaaac4d6b9ede1d9.png","img_label_uri_hant_static":"https://i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/VEW8fCC0hg.png"},"avatar_subscript":1,"nickname_color":"#FB7299","role":3,"avatar_subscript_url":"","tv_vip_status":0,"tv_vip_pay_type":0,"tv_due_date":0,"avatar_icon":{"icon_type":1,"icon_resource":{}}},"answer_status":0,"block_time":0,"role":"0","last_play_time":0,"last_play_cid":1307073790,"now_time":1710213970,"online_count":1,"need_login_subtitle":false,"subtitle":{"allow_submit":false,"lan":"","lan_doc":"","subtitles":[{"id":1340219178203881200,"lan":"ai-zh","lan_doc":"中文（自动翻译）","is_lock":false,"subtitle_url":"//aisubtitle.hdslb.com/bfs/ai_subtitle/prod/87441825713070737908a96e0db046f17450b6329bb67895c51?auth_key=1710213970-5ed1140119c44962a361767f38e541b4-0-b18242039253acf929868877e8c2d339","type":1,"id_str":"1340219178203881216","ai_type":1,"ai_status":2}]},"view_points":[],"preview_toast":"为创作付费，购买观看完整视频|购买观看","options":{"is_360":false,"without_vip":false},"guide_attention":[],"jump_card":[],"operation_card":[],"online_switch":{"enable_gray_dash_playback":"500","new_broadcast":"1","realtime_dm":"1","subtitle_submit_switch":"1"},"fawkes":{"config_version":28075,"ff_version":21289},"show_switch":{"long_progress":false},"bgm_info":null,"toast_block":false,"is_upower_exclusive":false,"is_upower_play":false,"is_ugc_pay_preview":false,"elec_high_level":{"privilege_type":0,"level_str":"","title":"","intro":""},"disable_show_up_info":false}};

if(!xx.原始xhropen){xx.原始xhropen=XMLHttpRequest.prototype.open;}

function 拦截xhropen(){try{
var rawOpen = xx.原始xhropen, urlopppp;
XMLHttpRequest.prototype.open = function() {
	urlopppp=arguments[1]+'';
	if(urlopppp.indexOf("x/web-interface/nav") != -1){
		log('重写xhr.open  替换登录navobjurl '+urlopppp+'  改为：'+navobjurl);
		arguments[1]=navobjurl;
	}else if(urlopppp.indexOf("x/player/wbi/v2?aid=") != -1){
		v2json. aid=window.__INITIAL_STATE__.aid;
		v2json. bvid=window.__INITIAL_STATE__.bvid;
		v2json. cid=window.__INITIAL_STATE__.videoData.cid;
		v2json. last_play_cid=window.__INITIAL_STATE__.videoData.cid;
		v2json. now_time=Date.parse(new Date())/1000;

		var blob = new Blob([JSON.stringify(v2json)]);blob.type="text/json";
		var objurl=window.URL.createObjectURL(blob);
		log('重写xhr.open  替换登录v2jsonurl '+urlopppp+'  改为：'+objurl);
		arguments[1]=objurl;
	}
	rawOpen.apply(this, arguments);
}
}catch(err){log("报错 拦截xhropen "+err);}}
拦截xhropen();

function 左边up主粉丝数(){
	var aa=document.querySelectorAll('.default-btn');var b=0;
	for(var i=0;i<aa.length;i++){
		var d=aa[i];
		if(d.outerHTML.indexOf("follow-btn")!=-1){
			if(d.outerHTML.indexOf("span")!=-1 && b==0){b++;
				var 粉丝数=(""+window.__INITIAL_STATE__.upData.fans).replace(/(\\d)(\\d{4})$/ig,"$1,$2");
				d.innerHTML="<span class=\\"follow-btn-inner\\" data-v-69475817=\\"\\"><svg width=\\"16\\" height=\\"16\\" viewBox=\\"0 0 16 16\\" fill=\\"none\\" xmlns=\\"http://www.w3.org/2000/svg\\" class=\\"follow-btn-icon\\" data-v-69475817=\\"\\"><path fill-rule=\\"evenodd\\" clip-rule=\\"evenodd\\" d=\\"M7.25098 8.75V13.25C7.25098 13.6642 7.58676 14 8.00098 14C8.41519 14 8.75098 13.6642 8.75098 13.25V8.75H13.251C13.6652 8.75 14.001 8.41421 14.001 8C14.001 7.58579 13.6652 7.25 13.251 7.25H8.75098V2.75C8.75098 2.33579 8.41519 2 8.00098 2C7.58676 2 7.25098 2.33579 7.25098 2.75V7.25H2.75098C2.33676 7.25 2.00098 7.58579 2.00098 8C2.00098 8.41421 2.33676 8.75 2.75098 8.75H7.25098Z\\" fill=\\"currentColor\\"></path></svg>"
				+"关注 "+粉丝数+"</span>";
				d.style.display='';
			}else{d.parentNode.removeChild(d);}
		}else if(d.outerHTML.indexOf("charge-btn")!=-1){
			d.outerHTML="<div class=\\"default-btn new-charge-btn charge-btn-loaded\\" data-v-69475817=\\"\\"><div data-v-69475817=\\"\\" class=\\"charge-btn-icon\\"><img data-v-69475817=\\"\\" src=\\"https://i0.hdslb.com/bfs/garb/item/33e2e72d9a0c855f036b4cb55448f44af67a0635.png@.webp\\" alt=\\"\\"></div><span data-v-69475817=\\"\\">充电</span></div>";
		}
	}
}setTimeout("左边up主粉丝数();",2000);
function 左边up主粉丝数_监听name节点(){
	const targetNode = document.querySelector('.up-detail-top');
	const observer = new MutationObserver((mutationsList, observer) => {
		for (let mutation of mutationsList) {
			if (mutation.type === 'childList') {
				log('子节点发生变化');
				左边up主粉丝数();
			} else if (mutation.type === 'attributes') {
				log('属性发生变化');
				左边up主粉丝数();
			}
		}
	});
	const config = { childList: true, attributes: true, subtree: true };
	observer.observe(targetNode, config);
}setTimeout("左边up主粉丝数_监听name节点();",2000);
`;
/************************xlogcode************************/


引导注入();